package br.com.lh.urabuilder.domain.xml
{
	import br.com.lh.urabuilder.util.ValidatorFactory;
	
	import mx.collections.ArrayCollection;
	import mx.resources.IResourceManager;
	import mx.resources.ResourceManager;
	
	public class DigitPromptAction extends PlaySoundAction
	{
		
		public var interruptable:UraActionField=new UraActionField(null,
		ResourceManager.getInstance().getString('messages','ura.components.interruptable')
		,true,new ArrayCollection([true,false]));
		
		public var numberOfDigits:UraActionField = new 
		UraActionField(ValidatorFactory.getRequiredValidator(ValidatorFactory.NUMBER_VALIDATOR,10),
		ResourceManager.getInstance().getString('messages','ura.components.digitnumber'),
		new Number(1));
		
		public var variable:UraActionField = new 
		UraActionField(ValidatorFactory.getValidator(ValidatorFactory.STRING_VALIDATOR,20,false),
		ResourceManager.getInstance().getString('messages','ura.components.variable')
		);
		
		
		override public function xmlName():String{
			return "DigitPrompt";
		}
		override public function toolTipText():String{
			return "Waits for the user to input a digit";
		}
		
		
		public function DigitPromptAction(){
			super();
		}
		
		override public function toXML(includeNull:Boolean):XML{
			var newXmlRow:XML= <DigitPrompt></DigitPrompt>
			super.buildXml(newXmlRow,includeNull);
			return newXmlRow;
		}

	}
}